Eclipse Platform
Pre-release 3.0

org.eclipse.ui.keys
Class CharacterKey

java.lang.Object
  extended byorg.eclipse.ui.keys.Key
      extended byorg.eclipse.ui.keys.NaturalKey
          extended byorg.eclipse.ui.keys.CharacterKey
All Implemented Interfaces:
Comparable

public final class CharacterKey
extends NaturalKey

Instances of CharacterKey represent keys on the keyboard which represent unicode characters.

CharacterKey objects are immutable. Clients are not permitted to extend this class.

EXPERIMENTAL

Since:
3.0

Field Summary
static CharacterKey BS
          The single static instance of CharacterKey which represents the 'BS' key.
static CharacterKey CR
          The single static instance of CharacterKey which represents the 'CR' key.
static CharacterKey DEL
          The single static instance of CharacterKey which represents the 'DEL' key.
static CharacterKey ESC
          The single static instance of CharacterKey which represents the 'ESC' key.
static CharacterKey FF
          The single static instance of CharacterKey which represents the 'FF' key.
static CharacterKey LF
          The single static instance of CharacterKey which represents the 'LF' key.
static CharacterKey NUL
          The single static instance of CharacterKey which represents the 'NUL' key.
static CharacterKey SPACE
          The single static instance of CharacterKey which represents the 'SPACE' key.
static CharacterKey TAB
          The single static instance of CharacterKey which represents the 'TAB' key.
static CharacterKey VT
          The single static instance of CharacterKey which represents the 'VT' key.
 
Fields inherited from class org.eclipse.ui.keys.Key
name
 
Method Summary
 char getCharacter()
          Gets the character that this object represents.
static CharacterKey getInstance(char character)
          Creates an instance of CharacterKey given a unicode character.
 
Methods inherited from class org.eclipse.ui.keys.Key
compareTo, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BS

public static final CharacterKey BS
The single static instance of CharacterKey which represents the 'BS' key.


CR

public static final CharacterKey CR
The single static instance of CharacterKey which represents the 'CR' key.


DEL

public static final CharacterKey DEL
The single static instance of CharacterKey which represents the 'DEL' key.


ESC

public static final CharacterKey ESC
The single static instance of CharacterKey which represents the 'ESC' key.


FF

public static final CharacterKey FF
The single static instance of CharacterKey which represents the 'FF' key.


LF

public static final CharacterKey LF
The single static instance of CharacterKey which represents the 'LF' key.


NUL

public static final CharacterKey NUL
The single static instance of CharacterKey which represents the 'NUL' key.


SPACE

public static final CharacterKey SPACE
The single static instance of CharacterKey which represents the 'SPACE' key.


TAB

public static final CharacterKey TAB
The single static instance of CharacterKey which represents the 'TAB' key.


VT

public static final CharacterKey VT
The single static instance of CharacterKey which represents the 'VT' key.

Method Detail

getInstance

public static CharacterKey getInstance(char character)
Creates an instance of CharacterKey given a unicode character. This method determines the correct name for the key based on character. Typically, this name is a string of one-character in length equal to the character that this instance represents.

Parameters:
character - the character that the resultant CharacterKey instance is to represent.
Returns:
an instance of CharacterKey representing the character.

getCharacter

public char getCharacter()
Gets the character that this object represents.

Returns:
the character that this object represents.

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.